# This file is part of BlackArch Linux ( https://www.blackarch.org/ ).
# See COPYING for license details.

pkgname=python2-packaging
_pkgname=packaging
pkgver=20.9
pkgrel=7
pkgdesc='Core utilities for Python packages.'
url='https://pypi.org/project/packaging/#files'
arch=('any')
license=('Apache')
depends=('python2' 'python2-pyparsing' 'python2-six')
makedepends=('python2-setuptools')
source=("https://files.pythonhosted.org/packages/source/${_pkgname::1}/$_pkgname/$_pkgname-$pkgver.tar.gz")
sha512sums=('229b729aa9be7730509b7036dce0ca0750103fb7e2cd45d51f0eeaf2a4731605d63d11e11c10c7c481e228faa5e860c2c8f7bc6bee3190cafd72c22d7b3db264')

build() {
  cd "$_pkgname-$pkgver"

  python2 setup.py build
}

package() {
  cd "$_pkgname-$pkgver"

  python2 setup.py install --root="$pkgdir" --prefix=/usr -O1 --skip-build
}

